<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		.box{
			width: 200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
		}

	</style>
	<script type="text/javascript">
		 window.onload = function  () {
		 	
		 	box = document.getElementById('box');


		 	box.onclick = function  () {
		 		alert(888);
		 	}

		 	box.onmouseover = function  () {
		 		box.style.backgroundColor="green";
		 	}

		 	box.onmouseout = function  () {
		 		box.style.backgroundColor="red";
		 	}

		 	inbtn = document.getElementById('inbtn');

		 	inbtn.onchange = function  () {
		 		alert(888)
		 	}

		 }
	</script>
</head>
<body>
	<div id="box" class="box"></div>
	<input type="text" id="inbtn">

	<span onmouseover="alert(9999)" onclick="alert(8888)" >学并思</span>
</body>
</html>